package template;

import java.util.function.Function;

public interface  BaseTemplate<T, R> {

    default boolean check(T param){
        return true;
    }

    default R build(T param, Function<T,R> function){
        return function.apply(param);
    }

    void execute(Handler handler, T param);

}

@FunctionalInterface
interface Handler<T>{
    void doHandler(T param);
}